/* 电子票据页面样式 */
.container {
  min-height: 100vh;
  background-color: #f5f5f5;
  padding-bottom: 20px;
}

/* 患者信息栏 */
.patientInfo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 15px 20px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.patientDetails {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.patientName {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.patientId {
  font-size: 14px;
  color: #666;
}

.switchButton {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.switchButton:hover {
  background-color: #f0f0f0;
  border-color: #d0d0d0;
}

.switchIcon {
  font-size: 16px;
}

.switchText {
  font-size: 14px;
  color: #666;
}

/* 发票列表标题 */
.listHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: white;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.listTitle {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.filterButton {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 14px;
}

.filterIcon {
  font-size: 14px;
}

/* 发票列表 */
.invoiceList {
  padding: 0 20px;
}

.invoiceCard {
  position: relative;
  background: white;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 状态指示条 */
.statusBar {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
}

.statusBar.issued {
  background-color: #1890ff;
}

.statusBar.reversed {
  background-color: #ff4d4f;
}

/* 发票内容 */
.invoiceContent {
  padding: 20px 20px 20px 24px;
}

/* 发票头部 */
.invoiceHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.invoiceType {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.invoiceStatus {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
}

.invoiceStatus.issued {
  color: #1890ff;
  background-color: #e6f7ff;
}

.invoiceStatus.reversed {
  color: #ff4d4f;
  background-color: #fff2f0;
}

/* 发票详情 */
.invoiceDetails {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.detailRow {
  display: flex;
  margin-bottom: 8px;
  font-size: 14px;
}

.label {
  color: #666;
  width: 80px;
  flex-shrink: 0;
}

.value {
  color: #333;
  flex: 1;
}

/* 预览区域 */
.previewArea {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.previewThumbnail {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.thumbnailImage {
  width: 60px;
  height: 40px;
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 5px;
  position: relative;
}

.thumbnailImage::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: #ff4d4f;
  border-radius: 50%;
}

.previewHint {
  font-size: 12px;
  color: #ff4d4f;
}

/* 操作区域 */
.actionArea {
  display: flex;
  justify-content: flex-end;
}

.sendEmailButton {
  background-color: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sendEmailButton:hover {
  background-color: #40a9ff;
}

/* 底部提示 */
.footerHint {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin-top: 20px;
  padding: 0 20px;
}

/* 患者切换弹窗 */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  z-index: 1000;
}

.modalContent {
  background: white;
  width: 100%;
  max-height: 60vh;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.modalHeader h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.closeButton {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patientList {
  margin-bottom: 20px;
}

.patientItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.patientItem:hover {
  background-color: #f9f9f9;
}

.patientItem.selected {
  background-color: #e6f7ff;
}

.patientItem .patientInfo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.patientItem .patientName {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.patientItem .patientId {
  font-size: 14px;
  color: #666;
}

.checkIcon {
  color: #1890ff;
  font-size: 18px;
  font-weight: bold;
}

.modalFooter {
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.addPatientButton {
  width: 100%;
  background: none;
  border: 1px solid #1890ff;
  color: #1890ff;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.addPatientButton:hover {
  background-color: #1890ff;
  color: white;
}

/* 邮箱发送弹窗 */
.emailModalContent {
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  padding: 0;
  animation: fadeIn 0.3s ease-out;
  position: relative;
  margin: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.emailModalHeader {
  padding: 20px 20px 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.emailModalHeader h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
  text-align: center;
}

.emailModalBody {
  padding: 20px;
}

.emailInput {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.emailInput:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.emailInput::placeholder {
  color: #bfbfbf;
}

.emailModalFooter {
  display: flex;
  gap: 12px;
  padding: 15px 20px 20px 20px;
  border-top: 1px solid #f0f0f0;
}

.cancelButton {
  flex: 1;
  background: none;
  border: 1px solid #d9d9d9;
  color: #666;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.cancelButton:hover {
  border-color: #bfbfbf;
  color: #333;
}

.confirmButton {
  flex: 1;
  background-color: #1890ff;
  border: none;
  color: white;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.confirmButton:hover {
  background-color: #40a9ff;
}

.confirmButton:active {
  background-color: #096dd9;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .container {
    padding-bottom: 10px;
  }
  
  .patientInfo {
    padding: 12px 15px;
  }
  
  .listHeader {
    padding: 12px 15px;
  }
  
  .invoiceList {
    padding: 0 15px;
  }
  
  .invoiceContent {
    padding: 15px 15px 15px 19px;
  }
  
  .modalContent {
    padding: 15px;
  }
}
